﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A68常量
{
    class Program
    {
        static void Main(string[] args)
        {
            Player p = new Player(1011);
        }
    }
    class MyMath
    {
        //const编译时常量  定义的时候必须赋值
        public  const float pi = 3.1415f; 
    }
    class Player
    {
        public readonly int id; //readonly 运行时常量  之能在定义时或构造函数中赋值
        public Player(int id)
        {
            this.id = id; 
        }
    }


}
